<!DOCTYPE html>
<html>
	<head th:replace="/mobile/common::head(~{::custom_settings})">
		<th:block th:fragment="custom_settings">
			<title>顺山科技智慧生活服务平台</title>
			<link type="text/css" rel="stylesheet" th:href="@{{css}/mobile/member/mobilepersonal/mobileOrderManagementCanceledDetails.css(css=${css})}"/>
			<script th:inline="javascript">
		    	var tabindex = [[${tabindex}]];
			</script>
		</th:block>
	</head>
	<body>
		<div class="weui-tab">
			<div class="weui-tab-title-orderdetails"><i class="fa fa-angle-left" onclick="back()"></i><h1>订单详情</h1></div>
			<th:block th:fragment="orderinfo_refresh">
				<div class="weui-tab-main-orderdetails">
					<div class="weui-tab-home-title personal-bg">
			   			<div class="personal-bg-my">
			   				<th:block th:if="${info.orderstate} eq '2' ">
				   				<div class="personal-bg-my-left"><i class="fa fa-clock-o"></i><h2>等待付款</h2></div>
				   				<div class="personal-bg-my-right"><span>剩余：<a th:text="${info.surplustime}"></a></span><p>需付款：<a th:text="'￥'+${info.paymenttotal}"></a></p></div>
			   				</th:block>
			   				<th:block th:if="${info.orderstate} eq '3' ">
			   					<div class="personal-bg-my-left"><i class="fa fa-clock-o"></i><h2>等待发货</h2></div>
			   				</th:block>
			   				<th:block th:if="${info.orderstate} eq '4' ">
			   					<div class="personal-bg-my-left"><i class="fa fa-clock-o"></i><h2>等待收货</h2></div>
			   				</th:block>
			   				<th:block th:if="${info.orderstate} eq '5' ">
			   					<div class="personal-bg-my-left"><i class="fa fa-check-circle"></i><h2>已完成</h2></div>
			   				</th:block>
			   				<th:block th:if="${info.orderstate} eq '6' ">
			   					<div class="personal-bg-my-left"><i class="fa fa-exclamation-circle"></i><h2>已取消</h2><p>取消原因：<span th:text="${info.canclereason}"></span></p></div>
			   				</th:block>
			   			</div>
					</div>
					<div class="personal-bg-sc">
						<div class="personal-details-address">
			    			<div class="weui-jd-qrdd-a1">
					    		<span class="weui-qrdd-a1-t1"><i class="fa fa-map-marker"></i><span th:text="${info.receivername}"></span></span>
					    		<span class="weui-qrdd-a1-t1" th:text="${info.receivephone}"></span>
					    		<div class="weui-qrdd-a1-b1">
						    		<span class="weui-qrdd-a1-t2">地址：</span>
					    			<span class="weui-qrdd-a1-t3" th:if="${not #strings.isEmpty(info.address)}" th:text="${info.address}+''+${info.detailaddress}"></span>
					    		</div>
					    	</div>
				    	</div>
		    		</div>
		    		<div class="personal-ordermd-list">
		    			<div class="weui-tab-buylist">
					      	<div class="weui-tab-buylist-gtime">
					      		<div class="weui-tab-buylist-gtime1"><h1><img th:src="@{{image}/mobile/member/pay-pic.png(image=${image})}"/><th:block th:text="${info.merchantname}"></th:block></h1></div>
				      		</div>
				      		<th:block th:each="order : ${info.goodlist}">
					      		<div class="weui-tab-buylist-det">
					      			<img th:src="${order.path}"/>
					      			<div class="weui-tab-buylist-gdetail">
					      				<span class="weui-tab-buylist-gtit1" th:text="${order.goodname}"></span>
					      				<span class="weui-tab-buylist-gd">数量：<i class="weui-tab-buylist-gm2" th:text="${order.goodnumber}"></i></span>
					      				<span class="weui-tab-buylist-gmoney"><i class="weui-tab-buylist-gm1" th:text="'￥'+${order.goodtotal}"></i></span>
					      			</div>
					      		</div>
				      		</th:block>
				      		<div class="weui-tab-buylist-btn">
				      			<a class="weui-tab-buylist-btn3"><i class="fa fa-smile-o"></i>联系客服</a>
				      		</div>
			      		</div>
		    		</div>
		    		<div class="personal-ordermd-xd">
		    			<div class="personal-ordermd-djbh"><h3>订单编号：</h3><a th:text="${info.ordercode}"></a></div>
		    			<div class="personal-ordermd-xdsj"><h3>下单时间：</h3><a th:text="${info.ordertime}"></a></div>
		    			<div class="personal-ordermd-zffs"><h3>支付方式：</h3><a th:text="${info.paymentmode}"></a></div>
		    			<div class="personal-ordermd-psfs"><h3>配送方式：</h3><a th:text="${info.deliverymode}"></a></div>
		    			<div class="personal-ordermd-psrq"><h3>期望配送日期：</h3><a th:text="${info.deliverytime}"></a></div>
		    		</div>
		    		<div class="personal-ordermd-ze">
		    			<div class="weui-cell">
				            <div class="weui-cell__bd">
				              <p>商品总额</p>
				            </div>
				            <div class="weui-cell__ft" th:text="'￥'+${info.goodtotal}"></div>
					  	</div>
					  	<div class="weui-cell">
				            <div class="weui-cell__bd">
				              <p>运费</p>
				            </div>
				            <div class="weui-cell__ft" th:text="'+￥'+${info.deliverycost}"></div>
					  	</div>
					  	<div class="weui-cell">
				            <div class="weui-cell__bd">
				              <p>订单总额</p>
				            </div>
				            <div class="weui-cell__ft" th:text="'￥'+${info.ordertotal}"></div>
					  	</div>
					  	<div class="weui-cell">
				            <div class="weui-cell__bd">
				              <p>钻石抵扣</p>
				            </div>
				            <div class="weui-cell__ft" th:if="${info.diamondpay != null}" th:text="'-￥'+${info.diamondpay}"></div>
				            <div class="weui-cell__ft" th:if="${info.diamondpay == null}" >-￥0</div>
					  	</div>
					  	<div class="weui-cell-ze">
				            <div class="weui-cell__fts">
				            	<th:block th:if="${info.orderstate} eq '2' ">
				            		需付款：
				   				</th:block>
				   				<th:block th:if="${info.orderstate} eq '3' ">
				   					已付款：
				   				</th:block>
				   				<th:block th:if="${info.orderstate} eq '4' ">
				   					已付款：
				   				</th:block>
				   				<th:block th:if="${info.orderstate} eq '5' ">
				   					实付款：
				   				</th:block>
				   				<th:block th:if="${info.orderstate} eq '6' ">
				   					实付款：
				   				</th:block>
				            	<a th:text="'￥'+${info.paymenttotal}"></a>
				            </div>
					  	</div>
		    		</div>
				</div>
				<footer class="prosonal-ordermd-btn">
					<div class="prosonal-ordermd-btn-fixed">
						<th:block th:if="${info.orderstate} eq '5' ">
							<div class="prosonal-ordermd-more">
								<ul>
									<li><a>更多<i class="fa fa-caret-down"></i></a>
										<ul class="erji">
											<li th:data-orderid="${info.orderid}" onclick="deleteorder(this.getAttribute('data-orderid'))">申请退款</li>
										</ul>
									</li>
								</ul>
							</div>
						</th:block>
						<div class="prosonal-ordermd-btn-list">
							<th:block th:if="${info.orderstate} eq '2' ">
								<a class="weui-yellow-color" href="javascript:void(0)" th:data-orderid="${info.orderid}" onclick="cancleorder(this.getAttribute('data-orderid'))">取消订单</a>
								<a class="weui-red-color" href="javascript:void(0)" th:data-orderid="${info.orderid}" th:data-paymodel="${info.paymodel}" th:data-orderorigin="${info.orderorigin}" onclick="gopay(this.getAttribute('data-orderid'),this.getAttribute('data-paymodel'),this.getAttribute('data-orderorigin'))">去支付</a>
			   				</th:block>
			   				<th:block th:if="${info.orderstate} eq '3' ">
			   					<th:block th:if="${info.isnorefundtype} eq 0">
				   					<a class="weui-yellow-color"href="javascript:void(0)" th:data-orderid="${info.orderid}" onclick="refundmoney(this.getAttribute('data-orderid'))">申请退款</a>
			   					</th:block>
			   					<th:block th:if="${info.isnorefundtype eq 1 || info.isnorefundtype eq 2 || info.isnorefundtype eq 3}">
				   					<a class="weui-yellow-color" style="background-color: #CCC;" href="javascript:void(0)">申请退款</a>
			   					</th:block>
			   				</th:block>
			   				<th:block th:if="${info.orderstate} eq '4' ">
			   					<th:block th:if="${info.isnorefundtype} eq 0">
				   					<a class="weui-yellow-color" href="javascript:void(0)" th:data-orderid="${info.orderid}" onclick="refundmoney(this.getAttribute('data-orderid'))">申请退款</a>
			   					</th:block>
			   					<th:block th:if="${info.isnorefundtype eq 1 || info.isnorefundtype eq 2 || info.isnorefundtype eq 3}">
				   					<a class="weui-yellow-color" style="background-color: #CCC;" href="javascript:void(0)">申请退款</a>
			   					</th:block>
								<a class="weui-red-color" href="javascript:void(0)" th:data-orderid="${info.orderid}" onclick="finishorder(this.getAttribute('data-orderid'))">确认收货</a>
			   				</th:block>
			   				<th:block th:if="${info.orderstate} eq '5' ">
			   					<th:block th:if="${info.orderorigin} eq 1">
				   					<a class="weui-yellow-color" style="background-color: #CCC;" href="javascript:void(0)">申请退款</a>
			   					</th:block>
			   					<th:block th:if="${info.orderorigin} eq 2">
				   					<th:block th:if="${info.isnorefundtype} eq 0">
					   					<a class="weui-yellow-color" href="javascript:void(0)" th:data-orderid="${info.orderid}" onclick="refundmoney(this.getAttribute('data-orderid'))">申请退款</a>
				   					</th:block>
				   					<th:block th:if="${info.isnorefundtype eq 1 || info.isnorefundtype eq 2 || info.isnorefundtype eq 3}">
					   					<a class="weui-yellow-color" style="background-color: #CCC;" href="javascript:void(0)">申请退款</a>
				   					</th:block>
			   					</th:block>
			   					<!-- 
				   					<a class="weui-yellow-color" href="javascript:void(0)" th:data-orderid="${info.orderid}" onclick="deleteorder(this.getAttribute('data-orderid'))">删除订单</a>
			   					 -->
								<a class="weui-red-color" href="javascript:void(0)" th:data-orderid="${info.orderid}" th:data-orderstate="${info.orderstate}" onclick="payagainorder(this.getAttribute('data-orderid'),this.getAttribute('data-orderstate'))">再次购买</a>
			   				</th:block>
			   				<th:block th:if="${info.orderstate} eq '6' ">
			   					<a class="weui-yellow-color" href="javascript:void(0)" th:data-orderid="${info.orderid}" onclick="deleteorder(this.getAttribute('data-orderid'))">删除订单</a>
								<a class="weui-red-color" href="javascript:void(0)" th:data-orderid="${info.orderid}" th:data-orderstate="${info.orderstate}" onclick="payagainorder(this.getAttribute('data-orderid'),this.getAttribute('data-orderstate'))">再次购买</a>
			   				</th:block>
						</div>
					</div>
				</footer>
			</th:block>
		</div>
		<!-- 退款弹框 -->
		<div th:replace="/mobile/member/mobilepersonal/moblieRefundWindow :: RefundWindow"></div>
		<!--退款弹框-->
	<script type="text/javascript" th:src="@{{js}/mobile/member/mobilepersonal/mobileOrderManagementDetails.js(js=${js})}"></script>
	</body>
</html>
	